import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

Vue.config.productionTip = false;

//全局axios
import axios from "axios";
import VueAxios from "vue-axios";
// axios.defaults.baseURL = 'http://82.157.19.46:3000'
axios.defaults.baseURL = "http://localhost:3000";
Vue.use(VueAxios, axios);

//引vant框架
import Vant from "vant";
import "vant/lib/index.css";
Vue.use(Vant);

//引入minui框架
import MintUI from "mint-ui";
import "mint-ui/lib/style.css";
Vue.use(MintUI);

//引入element-ui
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);

// 地址
import { AddressEdit } from "vant";
Vue.use(AddressEdit);

//轮播图框架
import VAS from "vue-awesome-swiper";
Vue.use(VAS);
import "swiper/css/swiper.css";

//全局指令
Vue.directive("src", function (el, bindings) {
  // el.src = 'https://xuezi.xin88.top/'+ bindings.value
  // el.src = " http://82.157.19.46:3000/images/" + bindings.value;
  el.src = "http://localhost:3000/images/" + bindings.value;
});

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
